#ifndef _PING_H
#define _PING_H

#include <netinet/ip_icmp.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <sys/types.h>
#include <unistd.h>

#define IPVERSION 4
#define ICMP_DATA_LEN 56

int ping(char const *argv);
int get_icmp_len(void);

int packping(int sendsqe);
unsigned short ping_checksum(unsigned char *buf, int len);
int decodepack(char *buf, int len);
float timesubtract(struct timeval *begin, struct timeval *end);

#endif
